package com.uniledger.exchange.home.scheme.fragment.transfer;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.uniledger.exchange.base.fragment.BaseCoreFragment;
import com.uniledger.exchange.base.fragment.BaseFragment;

import butterknife.ButterKnife;

/**
 *
 */
public abstract class TransferFragment extends BaseCoreFragment implements View.OnClickListener {

    protected OnTransferListener mListener;

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        if (context instanceof OnTransferListener) {
            mListener = (OnTransferListener) context;
        } else {
            throw new RuntimeException(context.toString()
                    + " must implement OnFragmentInteractionListener");
        }
    }

    @Override
    public void onDetach() {
        super.onDetach();
        mListener = null;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
//        if (mListener.getButton() != null)
//            mListener.getButton().setOnClickListener(this);
    }


}
